package io.renren.dao;

import io.renren.common.dao.BaseDao;
import io.renren.dto.WxuserDTO;
import io.renren.entity.WxuserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * ${comments}
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2024-05-20
 */
@Mapper
public interface WxuserDao extends BaseDao<WxuserEntity> {

    WxuserDTO getByWxuseroid(String wxuseroid);

    @Select("UPDATE WXUser SET WXOpenID = null WHERE WXUserOID =#{wxuseroid} ")
    void setWxOpenIdIsNull(@Param("wxuseroid") String wxuseroid);

    @Select("UPDATE WXUser SET TraderM_FK = null WHERE WXUserOID =#{wxuseroid} ")
    void setTraderMFKIsNull(@Param("wxuseroid") String wxuseroid);
}